<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="/static/css/demostyle.css" rel="stylesheet" type="text/css" media="all"/>
    <link href="/static/css/jquery-calendar.css" rel="stylesheet" type="text/css" media="all"/>
    <link href="/static/css/styles.css" rel="stylesheet" type="text/css"/>

    <script src="/static/scripts/jquery-1.4.1.min.js"></script>
    <script src="/static/scripts/jquery-calendar.js" type="text/javascript"></script>
    {#    <script src="/static/scripts/dynamic_table.js" type="text/javascript"></script>#}
    <script type="text/javascript" src="/static/scripts/scripts.js"></script>
</head>
<body>
<a href="/logout/">Выйти</a>
{% if admin %}
    <a href="/admin/">Главная</a>
{% endif %}
<a href="/history/{{ shopmaker }}">История изминений</a>

<div id="answer" style="display:none"></div>
{% if csv %}
    <input type="button" onClick="readTable('t')" value="Сохранить изменения">
    <table border="1" class="" id="t">
        <thead>
        <tr>
            <th><input disabled='true' style="border: none" value="тип"></th>
            <th><input disabled='true' style="border: none" value="набор атрибутов"></th>
            <th><input disabled='true' style="border: none" value="sku"></th>
            <th><input disabled='true' style="border: none" value="названия товара"></th>
            <th><input disabled='true' style="border: none" value="цена, грн"></th>
            <th><input disabled='true' style="border: none" value="цена, usd"></th>
            <th><input disabled='true' style="border: none" value="специальная цена, грн"></th>
            <th><input disabled='true' style="border: none" value="специальная цена, usd"></th>
            <th><input disabled='true' style="border: none" value="специальная цена с"></th>
            <th><input disabled='true' style="border: none" value="специальная цена по"></th>
            <th><input disabled='true' style="border: none" value="количество"></th>
        </tr>
        </thead>
        <tbody id="fbody">
        {% for row in csv %}
            <tr>
                <td>
                    <select style="border: none" class="select" name="attribute_type"
                            onchange="changeAttributeSet(this);">
                        <option>Отсуствует</option>
                        {% for attribute_type in types %}
                            <option {% ifequal attribute_type type %}
                                selected="selected" {% endifequal %}>{{ attribute_type }}</option>
                        {% endfor %}
                    </select>
                    <input style="border: none; display: none;" value="{{ row.type }}">
                </td>
                <td>
                    <select style="border: none" class="select" name="attribute_set"
                            onchange="changeAttributeSet(this);">
                        {% for attribute_set in sets %}
                            <option {% ifequal attribute_set row.attribute_set %}
                                selected="selected" {% endifequal %}>{{ attribute_set }}</option>
                        {% endfor %}
                    </select>
                    <input style="border: none; display: none;" value="{{ row.attribute_set }}">
                </td>
                <td>
                    <input style="border: none" disabled='true' onchange="changeVerify(this.id, this.value)"
                           value="{{ row.sku }}">
                </td>
                <td>
                    <input style="border: none" onchange="changeVerify(this.id, this.value)" value="{{ row.name }}">
                </td>
                <td>
                    <input style="border: none" onchange="changeVerify(this.id, this.value); nextCurrencyRate(this)"
                           value="{{ row.price }}">
                </td>
                <td>
                    <input style="border: none" onchange="changeVerify(this.id, this.value); previousCurrencyRate(this)"
                           value="{{ row.price_usd }}">
                </td>
                <td>
                    <input style="border: none" onchange="changeVerify(this.id, this.value); nextCurrencyRate(this)"
                           value="{{ row.special_price }}">
                </td>
                <td>
                    <input style="border: none" onchange="changeVerify(this.id, this.value); previousCurrencyRate(this)"
                           value="{{ row.special_price_usd }}">
                </td>
                <td>
                    <input class="calendarFocus" onchange="changeVerify(this.id, this.value)" style="border: none"
                           value="{{ row.special_from_date }}">
                </td>
                <td>
                    <input class="calendarFocus" onchange="changeVerify(this.id, this.value)" style="border: none"
                           value="{{ row.special_to_date }}">
                </td>
                <td>
                    <input class="calendarFocus" disabled='true' style="border: none" value="{{ row.qty }}">
                </td>
            </tr>
        {% endfor %}s
        </tbody>
    </table>
{% endif %}
<input value="{{ shopmaker }}" class="shopmaker" style="display: none">
<input value="{{ currency }}" id="currency" class="currency" style="display: none">
<script>
    // table 1
    //    var opt1 = {
    //        colTypes: ["alpha", "alpha", "alpha", "alpha", "alpha", "alpha", "alpha", "alpha", "alpha", "alpha"],
    //        pager: {
    //            rowsCount: 100,
    //            currentPage: 1
    //        }
    //    };
    //    new DynamicTable("t", opt1);

    create();
    $(".calendarFocus").calendar();
    //    $('#calendar1').datepick({dateFormat: 'yyyy-mm-dd'});

</script>


</body>
</html>


{#<li class="options">#}
{#    <input type="checkbox" class="checkbox" name="shipping[same_as_billing]" id="shipping:same_as_billing" value="1"<?php if($this->getShipAddress()->getSameAsBilling()){echo ' checked="checked" ';} ?> title="<?php echo $this->__('Ship to this address') ?>" onclick="shipping.setSameAsBilling(this.checked)" />#}
{#    <label>#}
{#        <?php echo $this->__('Ship to this address') ?>#}
{#    </label>#}
{#</li>#}